package com.suishoupai.xmb.dao;

import com.suishoupai.xmb.entity.CutOrders;
import com.suishoupai.xmb.entity.Orders;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Created by caojian on 2017/4/12.
 */
public interface CutOrdersMapper {
    Orders selectByUserIdAndStatus(@Param("userId") long userId, @Param("status") int status);

    List<CutOrders> selectCutOrdersListByUserIdAndStatus(@Param("userId") long userId, @Param("status") Integer status, @Param("ordersId") Long ordersId);

    List<CutOrders> selectCutOrdersListBySaleIdAndStatus(@Param("saleId") long saleId, @Param("status") int status);

    /**
     * @param time 小于该时间
     * @return
     */
    List<Orders> selectOvertimeNoPayOrdersList(@Param("overtime") long time);

    Orders selectByPrimaryKey(long id);

    int deleteByPrimaryKey(long id);

    int updateByPrimaryKeyWhenStatus(@Param("orders") Orders orders, @Param("whenStatus") int status);

}
